package solution;

import java.util.Arrays;
import java.util.Comparator;

public class T0112_1_ThirdMax {

    public int thirdMax(int[] nums) {
        return Arrays.stream(nums).boxed().distinct().sorted(Comparator.reverseOrder()).skip(2).findFirst().get();
    }
}
